package com.dddframework.core.contract.type;

import cn.hutool.core.collection.CollUtil;

import java.util.ArrayList;
import java.util.List;

public class IntegerList extends ArrayList<Integer> {
    public static final IntegerList EMPTY_LIST = new IntegerList();

    public static IntegerList convert(List<Integer> list) {
        if (CollUtil.isEmpty(list)) return IntegerList.EMPTY_LIST;
        IntegerList integerList = new IntegerList();
        integerList.addAll(list);
        return integerList;
    }

    public static List<Integer> convert(IntegerList list) {
        return list;
    }
}
